import request from "@/utils/request";

// 约课：全部课程
export const getReservationListAPI = (params) => {
  return request({
    url: "/reserve/all",
    method: "POST",
    data: params,
  });
};

// 约课：团课
export const getGroupReservationListAPI = (params) => {
  return request({
    url: "/reserve/group",
    method: "POST",
    data: params,
  });
};

// 约课：小班课
export const getSmallClassReservationListAPI = (params) => {
  return request({
    url: "/reserve/littleClass",
    method: "POST",
    data: params,
  });
};

// 约课：私教课
export const getPrivateReservationListAPI = (params) => {
  return request({
    url: "/reserve/privateCourse",
    method: "POST",
    data: params,
  });
};

// 获取课程详情
export const getCourseDetailAPI = (params) => {
  return request({
    url: "/reserve/courseDetail",
    method: "POST",
    data: params,
  });
};

// 获取私教课程详情
export const getPrivateCourseDetailAPI = (params) => {
  return request({
    url: "/reserve/teacherLessonDetail",
    method: "POST",
    data: params,
  });
};

// 门店私教老师详情
export const getStorePrivateTeacherDetailAPI = (params) => {
  return request({
    url: "/dashboard/teacherDetail",
    method: "POST",
    data: params,
  });
};

// 门店私教老师 非私教课
export const getTeacherNonPrivateCourseAPI = (params) => {
  return request({
    url: "/reserve/teacherCourseList",
    method: "POST",
    data: params,
  });
};

// 门店非私教课
export const getStoreNonPrivateCourseAPI = (params) => {
  return request({
    url: "/reserve/branchCourseList",
    method: "POST",
    data: params,
  });
};

// 获取用户课程卡
export const getUserCourseCardAPI = (params = {}) => {
  return request({
    url: "/order/getUserCard",
    method: "POST",
    data: params,
  });
};

// 取消课程
export const cancelCourseAPI = (params) => {
  return request({
    url: "/course/cancel",
    method: "POST",
    data: params,
  });
};

// 获取课程卡列表
export const getCourseCardListAPI = (params) => {
  return request({
    url: "/order/getBranchCard",
    method: "POST",
    data: params,
  });
};

// 签到课程
export const signInCourseAPI = (params) => {
  return request({
    url: "/course/sign",
    method: "POST",
    data: params,
  });
};
